@import url('https://fonts.googleapis.com/css2?family=Cal+Sans&family=Protest+Strike&display=swap');
@import url('https://fonts.googleapis.com/css2?family=PT+Serif+Caption:ital@0;1&display=swap');

/*

.cal-sans-regular {
  font-family: "Cal Sans", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.pt-serif-caption-regular {
  font-family: "PT Serif Caption", serif;
  font-weight: 400;
  font-style: normal;
}
*/

.item{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75em 0.5em;
    text-align: center;

    /* grow to fill the row but never get silly wide */
    flex: 1 1 9em;
    max-width: 13em;

    border-radius: var(--r-md);
    transition: transform var(--med) var(--ease),
                background-color var(--med) var(--ease);
    img{
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
        border-radius: var(--r-md);
        margin: 0em 0em 0.35em 0em;
        box-shadow: var(--shadow-sm);
        object-fit: cover;
        transition: box-shadow var(--med) var(--ease);
    }
    .itemName{
        padding: 0.35em 0em 0em 0em;
        font-family: 'Cal Sans', Arial, Helvetica, sans-serif;
        line-height: 1.3;
    }
    .itemPrice{
        font-family: "PT Serif Caption", serif;
        padding: 0.2em 0em 0em 0em;
        font-size: 0.85em;
        color: var(--purple-deep);
    }
}

.item:hover{
    transform: translateY(-4px);
    background-color: rgba(255, 255, 255, 0.6);
    img{
        box-shadow: var(--shadow-md);
    }
}



button{
    border: none;
    font-size: 1em;
    text-align: left;
    padding: 1em;
    background: transparent;

    transition: all var(--fast) var(--ease);
}

button:hover{
    background-color: rgba(139, 79, 209, 0.10);
    cursor: pointer;
}


/* ================================================
   TOP LEVEL SWITCH - products / flavours
   ================================================ */

.menuSelector{
    padding: 1em;
    display:  flex;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    width: min(72em, 100%);
    margin: 0em auto;
    h2{
        display: none;
    }
    button{
        flex: 1 1 0;
        max-width: 18em;
        text-align: center;
        font-family: 'Cal Sans', Arial, Helvetica, sans-serif;
        letter-spacing: 0.03em;
        color: var(--ink);
        border-radius: var(--r-pill);
        border: 2px solid rgba(139, 79, 209, 0.28);
        background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(240, 228, 252, 0.82)),url('../GIFFILES/pattern2.gif');
        background-size: 10em;
        box-shadow: var(--shadow-sm);
        transition: transform var(--med) var(--ease),
                    box-shadow var(--med) var(--ease),
                    color var(--med) var(--ease),
                    background-color var(--med) var(--ease);
    }

    button:hover{
        transform: translateY(-3px);
        color: white;
        background: linear-gradient(rgba(34, 22, 48, 0.72), rgba(34, 22, 48, 0.8)),url('../GIFFILES/pattern2.gif');
        background-size: 10em;
        box-shadow: var(--shadow-md);
    }

    button:active{
        transform: translateY(-1px);
    }
}


/* ================================================
   MENU BODY - category rail + item grid
   ================================================ */

.menuContainer{
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 5fr);
    gap: 1em;
    padding: 1em 2em 2em 2em;
    width: min(78em, 100%);
    margin: 0em auto 1em auto;
}

.itemType{
    display: flex;
    flex-direction: column;
    gap: 0.35em;
    padding: 0.75em;
    max-height: 50vh;
    overflow-y: auto;

    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    background-image: linear-gradient(rgba(255, 255, 255, 0.9),rgba(255, 255, 255, 0.86)), url('../GIFFILES/pattern2.gif');
    background-size: 16em;
    h2{
        padding: 0.5em;
        font-size: 0.9rem;
        color: var(--ink-faint);
        letter-spacing: 0.12em;
    }
    button{
        flex: 0 0 auto;
        width: 100%;
        padding: 0.85em 1em;
        border-radius: var(--r-md);
        font-family: 'Cal Sans', Arial, Helvetica, sans-serif;
        color: var(--ink-soft);
    }
    button:hover{
        color: var(--purple-deep);
        background-color: rgba(139, 79, 209, 0.12);
        transform: translateX(3px);
    }
}

/* menuHandle.js marks the category and tab you are on, so it is
   always obvious what the panel is showing */
.itemType button.activeCategory{
    color: var(--purple-deep);
    background-color: var(--purple-soft);
    font-weight: bold;
    box-shadow: inset 3px 0 0 var(--pink);
}

.menuSelector button.activeTab{
    color: white;
    background: linear-gradient(rgba(34, 22, 48, 0.78), rgba(34, 22, 48, 0.86)),url('../GIFFILES/pattern2.gif');
    background-size: 10em;
    border-color: var(--purple-deep);
    box-shadow: var(--shadow-md);
}

.itemList{
    overflow-y: auto;
    max-height: 50vh;
    padding: 0em 0.25em;
    h2{
        padding: 0.75em 0.5em;
        font-size: 1.2rem;
        color: var(--purple-deep);
    }
}

.menuList{
    background: linear-gradient(rgba(255, 255, 255, 0.9),rgba(255, 255, 255, 0.86)), url('../GIFFILES/purplestars2.gif');
    background-size: 8em;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5em;
    padding: 1em;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.briefMenu{
    margin: 1em auto 2em auto;
    width: min(72em, calc(100% - 2em));
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    padding: 0em 1em;
    a{
        padding: 0.8em 1.4em;
        background-color: rgba(255, 255, 255, 0.75);
        border: 1px solid var(--line);
        border-radius: var(--r-pill);
        box-shadow: var(--shadow-sm);
        transition: transform var(--med) var(--ease),
                    box-shadow var(--med) var(--ease),
                    background-color var(--med) var(--ease),
                    color var(--med) var(--ease);
    }
    a:hover{
        background-color: var(--ink);
        color: white;
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }
}

/* Optional: Responsive adjustments */
@media (max-width: 768px) {
    .menuSelector{
        display: flex;
        flex-direction: row;
        padding: 0.75em 1em 0.5em 1em;
        gap: 0.5em;
        align-items: stretch;
        justify-content: center;
        button{
            font-family: 'Cal Sans', Arial, Helvetica, sans-serif;
            font-size: 0.95em;
            padding: 0.85em 0.5em;
            margin: 0em;
        }
    }

    /* the section divs get an inline display:grid from menuHandle.js,
       so collapse to a single column instead of fighting it */
    .menuContainer{
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75em;
        padding: 0em 1em 1.5em 1em;
        height: auto;
    }

    .itemType{
        flex-direction: row;
        align-items: center;
        max-height: none;
        padding: 0.5em;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        border-radius: var(--r-pill);
        h2{
            display: none;
        }
        /* chips, so they actually read as things you can tap */
        button{
            flex: 0 0 auto;
            width: auto;
            white-space: nowrap;
            scroll-snap-align: center;
            border-radius: var(--r-pill);
            border: 1px solid rgba(139, 79, 209, 0.25);
            background-color: rgba(255, 255, 255, 0.85);
            color: var(--ink);
            padding: 0.6em 1em;
            font-size: 0.85em;
        }
        button:hover{
            transform: none;
        }
        button.activeCategory{
            box-shadow: inset 0 -3px 0 var(--pink);
            border-color: var(--purple-deep);
        }
    }

    .itemType::-webkit-scrollbar{
        display: none;
    }

    .itemList{
        max-height: none;
        overflow: visible;
    }

    .menuList{
        border-radius: var(--r-md);
        padding: 0.75em 0.5em;
    }

    .item{
        flex: 1 1 8em;
        max-width: none;
        padding: 0.5em 0.35em;
    }

    button{
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 100%;
    }

    .briefMenu{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5em;
        padding: 0em 1em 1.5em 1em;
        width: auto;
        a{
            padding: 0.75em 1em;
        }
    }
}
